Answer:
Option A
Explanation:
Let AB =x

In \triangle DAM, \tan (\pi-\theta-\alpha)=\frac{p}{x-q}
\Rightarrow \tan (\theta+\alpha)=\frac{p}{q-x}
\Rightarrow q-x=p\cot(\theta+\alpha)
\Rightarrow x=q-p \cot(\theta+\alpha)
=q-p\left(\frac{\cot\theta\cot\alpha-1}{\cot\alpha+\cot\theta}\right)
\left(\because \cot\alpha=\frac{q}{p}\right)
=q-p\left(\frac{\frac{q}{p}\cot\theta-1}{\frac{q}{p}+\cot\theta}\right)
=q-p\left(\frac{q\cot\theta-p}{q+p\cot\theta}\right)
=q-p\left(\frac{q\cos\theta-p\sin\theta}{q\sin\theta+p\cos\theta}\right)
\Rightarrow \frac{q^{2}\sin\theta+pq\cos\theta-pq\cos\theta+p^{2}\sin\theta}{p\cos\theta+q\sin\theta}
\Rightarrow AB=\frac{(p^{2}+q^{2})\sin\theta}{p\cos\theta+q\sin\theta}